package com.jeesite.modules.dataScreen.web;

import cn.hutool.json.JSONUtil;
import cn.hutool.poi.excel.ExcelReader;
import cn.hutool.poi.excel.ExcelUtil;
import com.jeesite.modules.dataScreen.service.PerceptionService;
import com.jeesite.modules.dataScreen.web.vo.Result;
import com.jeesite.modules.dataScreen.web.vo.perception.*;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.List;

@RestController
@RequestMapping("/perception")
@Api(tags = "首页-感知预警")
public class PerceptionApi {

    @Resource
    private PerceptionService perceptionService;

    @ApiOperation("交通执法模块数据")
    @GetMapping("/trafficModel")
    public Result<TrafficModelVo> trafficModel() {
        return Result.OK(perceptionService.trafficModel());
    }

    @ApiOperation("基础实施")
    @GetMapping("/baseMeasure")
    public Result<BaseMeasureVo> baseMeasure() {
        return Result.OK(perceptionService.baseMeasure());
    }

    @ApiOperation("运输服务")
    @GetMapping("/transportService")
    public Result<TransportServiceVo> transportService() {
        return Result.OK(perceptionService.transportService());
    }

    @ApiOperation("行业智治")
    @GetMapping("/examine")
    public Result<ExamineVo> examine() {
        return Result.OK(perceptionService.examine());
    }

    @ApiOperation("感知预警四个板块")
    @GetMapping("/warningNew")
    public Result<List<WarningNewModelVo>> warningNew() {
        return Result.OK(perceptionService.warningNewVo());
    }
}
